import { $post, $fileDownLoad2, $get } from '@/api/request'
let basic = '/prevention'
// 风险筛查列表-列表
export const getPreventionRiskScreenList = data => {
  return $post({
    url: `${basic}/preventionRiskScreen/getPreventionRiskScreenList`,
    data
  })
}
// 风险筛查列表-导出
export const exportPreRiskScreen = data => {
  return $fileDownLoad2({
    url: `${basic}/preventionRiskScreen/exportPreRiskScreen`,
    method: 'post',
    filename: '风险筛查列表.xls',
    data
  })
}
// 风险筛查列表-申诉中
export const getPreventionAppeal = data => {
  return $post({
    url: `${basic}/preventionRiskScreen/getPreventionAppeal`,
    data
  })
}
// 风险筛查列表-是否申诉通过
export const isEffectiveAdopt = data => {
  return $post({
    url: `${basic}/preventionRiskScreen/isEffectiveAdopt`,
    data
  })
}
// 风险筛查列表-通知、一键通知
export const savePreventionMsgNotice = data => {
  return $post({
    url: `${basic}/preventionRiskScreen/savePreventionMsgNotice`,
    data
  })
}
// 风险筛查列表-加入白名单
export const addWhiteList = data => {
  return $post({
    url: `${basic}/whiteList/addWhiteList`,
    data
  })
}
// 风险筛查列表-移除白名单
export const deleteWhiteList = id => {
  return $post({
    url: `${basic}/whiteList/deleteWhiteList/${id}`
  })
}
// 风险规则-列表
export const getPreventionRiskRulesList = data => {
  return $post({
    url: `${basic}/preventionRiskRules/getPreventionRiskRulesList`,
    data
  })
}
// 风险规则-删除
export const deletePreventionRiskRules = data => {
  return $post({
    url: `${basic}/preventionRiskRules/deletePreventionRiskRules`,
    data
  })
}
// 风险规则-查看
export const findPreventionRiskRulesDetail = data => {
  return $post({
    url: `${basic}/preventionRiskRules/findPreventionRiskRulesDetail`,
    data
  })
}
// 风险规则-启动、禁用
export const isEffectivePreventionRiskRules = data => {
  return $post({
    url: `${basic}/preventionRiskRules/isEffectivePreventionRiskRules`,
    data
  })
}
// 风险规则-新增、修改
export const savePreventionRiskRules = data => {
  return $post({
    url: `${basic}/preventionRiskRules/savePreventionRiskRules`,
    data
  })
}
// 风险规则数据刷新
export const refreshRiskScreenData = data => {
  return $get({
    url: `${basic}/preventionRiskRules/refreshRiskScreenData`,
    data
  })
}

// 白名单列表
export const queryWhiteListByPage = data => {
  return $post({
    url: `${basic}/whiteList/queryWhiteListByPage`,
    data
  })
}
